package iip_type




const (
    SalesOrderTypeUnknown      = iota
    SalesOrderTypeAgent
    SalesOrderTypeRetail
    SalesOrderManuallyOutBound
)


const (
    SalesOrderStateUnknown               = iota
    SalesOrderStateCreateBySale
    SalesOrderStateConfirmByFinance
    SalesOrderStateLogisticsTaskCreate
    SalesOrderStateVehicleDispatchCreate
    SalesOrderStateTransport
    SalesOrderStateDone
    SalesOrderStateTerminate
)


const (
    LogisticsTaskTypeUnknown         = iota
    LogisticsTaskTypeSale
    LogisticsTaskTypeManullyOutbound
    LogisticsTaskTypeProduceTask
    LogisticsTaskTypeFamo
    LogisticsTaskTypeLuofang
)


const (
    LogisticsTaskStateUnknown  = iota
    LogisticsTaskStateCreate
    LogisticsTaskStateAllocate
    LogisticsTaskStateDone
)


const (
    TransportOrderTypeUnknown                       = iota
    TransportOrderTypeInternalRawToProductStore
    TransportOrderTypeInternalRawToRawStore
    TransportOrderTypeInternalRawToProduce
    TransportOrderTypeInternalRawStoreToProduce
    TransportOrderTypeInternalProductToProductStore
    TransportOrderTypeInternalWastes
    TransportOrderTypeLuofangToProduce
    TransportOrderTypeLuofangToProductStore
    TransportOrderTypeFamoToProductStore
    TransportOrderTypeFamoToOtherStore
    TransportOrderTypeSale
    TransportOrderTypeManually
)


const (
    TransportOrderStateUnknown      = iota
    TransportOrderStateCreate
    TransportOrderStateDirverAccept
    TransportOrderStateInZone
    TransportOrderStateFill
    TransportOrderStateWeight1
    TransportOrderStateWeight2
    TransportOrderStateOutZone
    TransportOrderStateOnTheWay
    TransportOrderStateDone
    TransportOrderStateTerminate
)


const (
    ProductTypeUnknown = iota
    ProductTypeStock
)


const (
    ProductStatusUnknown = iota
    ProductStatusActive
    ProductStatusSuspend
)


const (
    WeightTypeUnknown = iota
    WeightTypeSales1
    WeightTypeSales2
)

func TransportOrderType(n int) string {
    lut := [...]string{
        TransportOrderTypeUnknown:                       "未知任务",
        TransportOrderTypeInternalRawToProductStore:     "毛料入产品库内倒",
        TransportOrderTypeInternalRawToRawStore:         "毛料入毛料库内倒",
        TransportOrderTypeInternalRawToProduce:          "毛料投料内倒",
        TransportOrderTypeInternalRawStoreToProduce:     "从毛料库到投料内倒",
        TransportOrderTypeInternalProductToProductStore: "产品到产品库内倒",
        TransportOrderTypeInternalWastes:                "渣土废料内倒",
        TransportOrderTypeLuofangToProduce:              "落方到投料",
        TransportOrderTypeLuofangToProductStore:         "落方到产品库",
        TransportOrderTypeFamoToProductStore:            "罚没到产品库",
        TransportOrderTypeFamoToOtherStore:              "罚没到其他库",
        TransportOrderTypeSale:                          "销售出库",
        TransportOrderTypeManually:                      "手动出库",
    }
    if n >= len(lut) {
        n = 0
    }
    return lut[n]
}

func SalesOrderState(n int) string {
    lut := [...]string{
        SalesOrderStateUnknown:               "未知状态",
        SalesOrderStateCreateBySale:          "销售创建订单",
        SalesOrderStateConfirmByFinance:      "财务确认订单",
        SalesOrderStateLogisticsTaskCreate:   "物流任务分配",
        SalesOrderStateVehicleDispatchCreate: "运输单创建",
        SalesOrderStateTransport:             "称重完毕开始运输",
        SalesOrderStateDone:                  "收货确认",
    }
    if n >= len(lut) {
        n = 0
    }
    return lut[n]
}
